/*
 * @Copyright: Copyright (c) 2030 吴周海
 * @Author: wzh200x@126.com
 * @Date: 2025-10-10 15:47:51
 * @LastEditors: wzh200x@126.com
 * @LastEditTime: 2025-10-10 15:53:11
 * @FilePath: \goWebServer\goGameWebServer\internal\controller\response.go
 * @Description: 文件功能描述
 */
package controller

import "github.com/gogf/gf/v2/net/ghttp"

func BackResponseOK(r *ghttp.Request, data interface{}) {
	r.SetParam("code", 0)
	r.SetParam("message", "")
	r.SetParam("data", data)
}

func BackResponseError(r *ghttp.Request, code int, message string) {
	r.SetParam("code", code)
	r.SetParam("message", message)
	r.SetParam("data", nil)
}
